package com.uzai.common.enums;

/**
 * 日志类型
 * @author liuqi
 * @date 2021/8/27 17:19
 * @param
 * @return null
 */
public enum LogBizTypeEnum {
    TURNLINK_TB(0,"淘宝","查券"),
    TURNLINK_JD(1,"京东","查券"),
    TURNLINK_PDD(2,"拼多多","查券"),
    TURNLINK_VPH(3,"唯品会","查券"),
    TURNLINK_DY(4,"抖音","查券"),
    TURNLINK_LOCAL_LIFE(5,"本地生活","查询活动"),
    TURNLINK_MT(30,"本地生活","查询美团活动"),
    TURNLINK_ELM(31,"本地生活","查询饿了么活动"),

    ORDER_TB(6,"淘宝","订单"),
    ORDER_JD(7,"京东","订单"),
    ORDER_PDD(8,"拼多多","订单"),
    ORDER_VPH(9,"唯品会","订单"),
    ORDER_DY(10,"抖音","订单"),
    ORDER_LOCAL_LIFE(11,"本地生活","订单"),
    ORDER_MT(32,"本地生活","美团订单"),
    ORDER_ELM(33,"本地生活","饿了么订单"),

    USER_TAKE_BAL(12,"提现","提现"),
    SEND_REDPACK(13,"红包","红包"),
    USER_SIGN(14,"签到","签到"),
    SHOPPING_GUID(15,"导购","导购"),
    USER_REG(16,"好友添加","好友添加"),
    AUTO_REMARK(17,"自动备注","自动备注"),
    ACCOUNT_QUERY(18,"账户查询","账户查询"),
    USER_TAKE_BAL_REDPACK(19,"提现","微信红包"),

    REWARD_REG(34,"奖励","好友添加奖励"),
    REWARD_FRIST_QUERY(35,"奖励","首查奖励"),
    REWARD_FRIST_ORDER(36,"奖励","首单奖励"),
    REWARD_TAKE_BAL(37,"奖励","提现奖励"),
    REWARD_INVITE_PARENT(38,"奖励","邀请奖励上级"),
    REWARD_INVITE_USER(39,"奖励","邀请奖励下级"),
    REWARD_SIGN(40,"奖励","签到奖励"),
    REWARD_INVITE_AGENT(41,"奖励","邀请奖励代理"),
    REWARD_INVITE_PARTNER(42,"奖励","邀请奖励合伙人"),
    REWARD_SUBPUB(43,"奖励","关注公众号奖励"),
    REWARD_UPGRADE(44,"奖励","升级奖励"),
    REWARD_FIRST_SETTLE(45,"奖励","首单结算奖励"),
    REWARD_INVITE_OTHER(46,"奖励","额外邀请奖励"),
    MARKETING_ORDER_REWARD(47,"奖励","订单额外奖励"),


    MARKETING(21,"推广裂变","推广裂变"),
    USER_FAQ(20,"超级问答","超级问答"),
    KZ_DOMAIN(80,"快站域名","快站域名"),
    CMS(90,"CMS","CMS"),

    SET_UNKNOWN_MSG_NOT_SETREPLY(100,"设置","未识别消息未设置回复语"),

    CLIENT_LOG(200,"客户端日志","客户端日志"),
    FOLLOW_PYQ(201,"朋友圈跟发", "朋友圈跟发"),

    PULL_GROUP_FAIL(251, "拉群", "拉群失败"),

    CONSOLE_PYQ_SEND_AUTO(300, "运营商后台-朋友圈", "朋友圈自动发送"),
    CONSOLE_PYQ_SEND_FOLLOW(301, "运营商后台-朋友圈", "朋友圈跟发"),
    CONSOLE_PYQ_SEND_HANDER(302, "运营商后台-朋友圈", "朋友圈手动发送"),
    CONSOLE_FD_SEND_FOLLOW(303, "运营商后台-社群发单", "发单跟发"),
    CONSOLE_FD_SEND_HANDER(304, "运营商后台-社群发单", "发单手动发送"),
    CONSOLE_ELM_TOKEN(305, "运营商后台-饿了么授权", "饿了么授权"),
    CONSOLE_FD_SEND_FOLLOW_QF(306, "运营商后台-社群发单", "气氛组跟发"),
    CONSOLE_FANS_COUNT_DATA_PANEL(307, "运营商后台-粉丝计数器", "粉丝计数器"),
    FD_GROUP_COUNT_DATA_PANEL(308, "采集群-内容跟发", "采集器跟发"),
    CONSOLE_MOBILE_AMOUNT(309, "运营商后台-手机版监控余额", "手机版监控余额"),

    // 500 - 600 用于监控运营商使用的功能次数排行
    PULL_GROUP(500, "拉群", "加好友拉群"),
    MD_EXCHANGE(501, "免单", "免单兑换成功"),
    DEVICE_MOBILE_SOFT_AUTH(502, "手机版机器人", "软件授权"),

    //700-800 用于用户相关日志
    USER_PUBLIC_BLACKLIST(700,"会员","全网黑名单"),
    ORDER_KS(50,"快手","订单"),
    TURNLINK_KS(51,"快手","查券"),

    REWARD_RULE(800,"返利","返利规则")
    ;

    private Integer value;
    private String desc;
    private String type;

    public static final int TURNLINK_TB_VALUE = 0;
    public static final int TURNLINK_JD_VALUE = 1;
    public static final int TURNLINK_PDD_VALUE = 2;
    public static final int TURNLINK_VPH_VALUE = 3;
    public static final int TURNLINK_DY_VALUE = 4;
    public static final int TURNLINK_LOCAL_LIFE_VALUE = 5;
    public static final int TURNLINK_MT_VALUE = 30;
    public static final int TURNLINK_ELM_VALUE = 31;
    public static final int TURNLINK_KS_VALUE = 51;

    public static final int ORDER_TB_VALUE = 6;
    public static final int ORDER_JD_VALUE = 7;
    public static final int ORDER_PDD_VALUE = 8;
    public static final int ORDER_VPH_VALUE = 9;
    public static final int ORDER_DY_VALUE = 10;
    public static final int ORDER_LOCAL_LIFE_VALUE = 11;
    public static final int ORDER_MT_VALUE = 32;
    public static final int ORDER_ELM_VALUE = 33;
    public static final int ORDER_KS_VALUE = 50;

    public static final int USER_TAKE_BAL_VALUE = 12;
    public static final int SEND_REDPACK_VALUE = 13;
    public static final int USER_SIGN_VALUE = 14;
    public static final int SHOPPING_GUID_VALUE = 15;
    public static final int USER_REG_VALUE = 16;
    public static final int AUTO_REMARK_VALUE = 17;
    public static final int ACCOUNT_QUERY_VALUE = 18;
    public static final int USER_TAKE_BAL_REDPACK_VALUE = 19;

    public static final int REWARD_REG_VALUE = 34;
    public static final int REWARD_FRIST_QUERY_VALUE = 35;
    public static final int REWARD_FRIST_ORDER_VALUE = 36;
    public static final int REWARD_TAKE_BAL_VALUE = 37;
    public static final int REWARD_INVITE_PARENT_VALUE = 38;
    public static final int REWARD_INVITE_USER_VALUE = 39;
    public static final int REWARD_SIGN_VALUE = 40;
    public static final int REWARD_INVITE_AGENT_VALUE = 41;
    public static final int REWARD_INVITE_PARTNER_VALUE = 42;
    public static final int REWARD_SUBPUB_VALUE = 43;
    public static final int REWARD_UPGRADE_VALUE = 44;
    public static final int REWARD_FIRST_SETTLE_VALUE = 45;
    public static final int REWARD_INVITE_OTHER_VALUE = 46;
    public static final int MARKETING_ORDER_REWARD_VALUE = 47;


    public static final int MARKETING_VALUE = 21;
    public static final int USER_FAQ_VALUE = 20;
    public static final int KZ_DOMAIN_VALUE = 80;
    public static final int CMS_VALUE = 90;

    public static final int SET_UNKNOWN_MSG_NOT_SETREPLY_VALUE = 100;
    public static final int CLIENT_LOG_VALUE = 200;
    public static final int FOLLOW_PYQ_VALUE = 201;
    public static final int PULL_GROUP_FAIL_VALUE = 251;

    public static final int CONSOLE_PYQ_SEND_AUTO_VALUE = 300;
    public static final int CONSOLE_PYQ_SEND_FOLLOW_VALUE = 301;
    public static final int CONSOLE_PYQ_SEND_HANDER_VALUE = 302;
    public static final int CONSOLE_FD_SEND_FOLLOW_VALUE = 303;
    public static final int CONSOLE_FD_SEND_HANDER_VALUE = 304;
    public static final int CONSOLE_ELM_TOKEN_VALUE = 305;
    public static final int CONSOLE_FD_SEND_FOLLOW_QF_VALUE = 306;



    public static final int PULL_GROUP_VALUE = 500;
    public static final int MD_EXCHANGE_VALUE = 501;
    public static final int DEVICE_MOBILE_SOFT_AUTH_VALUE = 502;

    public static final int USER_PUBLIC_BLACKLIST_VALUE = 700;

    public static final int REWARD_RULE_VALUE = 800;

    LogBizTypeEnum(Integer value,String type, String desc) {
        this.value = value;
        this.type = type;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public static LogBizTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (LogBizTypeEnum type: LogBizTypeEnum.values()) {
            if (type.getValue().intValue() == id) {
                return type;
            }
        }
        return null;
    }
}
